<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        new Promise((resolve,reject)=>{
            resolve('ok');
            // reject('error');
        })
        .then(value1=>{
            console.log('这是你最后一段旅途');
            return new Promise(()=>{});
            // return value1;
            // 阻断链式调用？ 就得返回一个pending状态的promise
        },reason1=>{
            return new Promise((resolve,reject)=>{
                reject(reason1);
            })
        }).
        then(value2=>{
            return value2;
        },reason2=>{
            return new Promise((resolve,reject)=>{
                reject(reason2);
            })
        }).
        then(value3=>{
            console.log(value3);
        },reason3=>{
            console.log(reason3);
        })
    </script>
</body>
</html>